package com.report.dto.response;

import cn.zhxu.bs.bean.DbField;
import cn.zhxu.bs.bean.SearchBean;
import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * @author summer
 * @date 2024-06-29 9:44
 *
 */
@Data
@SearchBean(tables = " research_download b LEFT JOIN research_report r ON r.id=b.report_id" +
        " Left JOIN research_file f ON r.file_id=f.id " +
        " LEFT JOIN research_tag t2 ON t2.id=r.industry_id  " +
        "   LEFT JOIN  research_tag t3 ON t3.id=r.recentId ",autoMapTo = "b" ,orderBy = "b.createTime DESC")
public class DownloadReportRes implements Serializable {

    @DbField("b.id")
    private Integer id;

    @DbField("b.report_id")
    private Integer reportId;

    @DbField("r.name")
    private String name;

    @DbField("b.member_id")
    private Integer memberId;

    @DbField("t2.name")
    private String industryName;

    @DbField("t3.name")
    private String recentName;

    @DbField("b.createTime")
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    private Date createTime;

    @DbField("f.pages")
    private Integer pages;


//    @TableField("r.browse_num")
//    private Integer browseNum;
}
